package com.pmcc.core.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 角色权限
 * Created by tomas on 2018/4/9.
 */
@Entity
@Table(name = "sys_role")
public class Role extends UUIDEntity {

    @Column(name = "code")
    private String code;// 角色编号

    @Column(name = "name")
    private String name;//角色名称

    @Column(name = "fettle")
    private Integer fettle;//状态 0 启用 1禁用

    @Column(name = "del_flag")
    private Integer delFlag;//删除标记

    @Column(name="remark")
    private String remark;//备注

    @Column(name = "creator")
    private String creator;

    @Column(name = "create_time")
    private Date createTime;
    @Column(name = "menu_key")
    private String menuKey;//菜单key
    @Column(name="menu_list")
    private String menuList;


    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getFettle() {
        return fettle;
    }

    public void setFettle(Integer fettle) {
        this.fettle = fettle;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getMenuKey() {
        return menuKey;
    }

    public void setMenuKey(String menuKey) {
        this.menuKey = menuKey;
    }

    public String getMenuList() {
        return menuList;
    }

    public void setMenuList(String menuList) {
        this.menuList = menuList;
    }
}
